<template>
  <div class="offline-detail">
    <van-nav-bar title="付款详情" left-arrow @click-left="backUp"></van-nav-bar>
    <section>
      <p>
        打款金额：
        <span>{{order_price}}</span>&nbsp;元
      </p>
      <p>订单编号：{{order_sn}}</p>
      <!-- <p>商家收款账号：</p> -->
      <!-- <p class="tip">线下转款请上传转款凭证，联系工作人员：{{order_sn}}，审核通过！</p> -->
    </section>
    <van-button type="danger" style="margin-bottom: 15px;">我已付款</van-button>
    <van-button type="delete">暂不付款</van-button>
  </div>
</template>
<script>
import api from "@/utils/api";
export default {
  name: "offlinedetail",
  data() {
    return {
      order_price: "",
      order_sn: ""
    };
  },
  mounted() {
    this.vipSubmit();
  },
  methods: {
    vipSubmit() {
      this.$axios({
        method: "post",
        url: api.vipsubmit,
        data: this.$qs.stringify({
          token: localStorage.getItem("token"),
          goods_id: this.$route.query.goods_id
        })
      }).then(res => {
        this.order_sn = res.order_sn;
        this.order_price = res.order_price;
      });
    },
    backUp() {
      this.$router.go(-2);
    }
  }
};
</script>
<style lang="less" scoped>
@import "~style/common.less";
.offline-detail {
  background-color: #f7f7f7;
  section {
    background-color: #fff;
    padding: 15px;
    p {
      .font-dpr(16px);
      line-height: 3;
      span {
        color: @priColor;
      }
      &.tip {
        text-indent: 2em;
        .font-dpr(14px);
        line-height: 30px;
      }
    }
    margin-bottom: 20px;
  }
  .van-button {
    display: block;
    width: 94vw;
    margin: 0 auto;
  }
}
</style>